Skip to content

Add BW16 SD Card Example using the SPI Bus #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 14, 2025

Conversation

designer2k2
Copy link
Contributor

Description of Change

This is a example on how to read a SD Card on the BW16 using the SPI bus.

Further it has a needed pin naming extension, so that external Libraries (like SdFat) using Arduino naming convention also work on the BW16.

This change also must be included to make it work: 4918cdc

Tests and Environments

  • AMB16
  • ambd_arduino current dev
  • Arduino IDE 2.3.4
  • Windows 11

Hardware used:
grafik

This is the output from the programm with a 8GB SD Card:


type any character to start
init time: 4 ms

Card type: SDHC
sdSpecVer: 5.00
HighSpeedMode: true

Manufacturer ID: 0X0
OEM ID: ��
Product: SD16G
Revision: 2.0
Serial number: 0X10
Manufacturing date: 3/2020

cardSize: 7818.18 MB (MB = 1,000,000 bytes)
flashEraseSize: 128 blocks
eraseSingleBlock: true
dataAfterErase: ones

OCR: 0XC0FF8000

SD Partition Table
part,boot,bgnCHS[3],type,endCHS[3],start,length
1,0X0,0X0,0X0,0X0,0XB,0X0,0X0,0X0,32,15269856
2,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0
3,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0
4,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0

Scanning FAT, please wait.

Volume is FAT32
sectorsPerCluster: 64
fatStartSector:    4496
dataStartSector:   8224
clusterCount:      238463
freeClusterCount:  238462

Copy link

This pull request is stale because there is no activity for 14 days

Add "setup" and "loop" for passing the CI test
Copy link
Contributor

@M-ichae-l M-ichae-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proceed to merge

@M-ichae-l M-ichae-l merged commit 327afab into Ameba-AIoT:dev Apr 14, 2025
11 checks passed
@designer2k2 designer2k2 deleted the patch-1 branch April 14, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants